'use strict'

const Koa = require('koa')
const bodyparser = require('koa-bodyparser')
const cors = require('koa-cors')
const router = require('./router')
const {sync}=require('./model')

let app = new Koa()

sync()


app.use(bodyparser())
app.use(cors())
app.use(router.routes())

let port = 3000;
app.listen(port)
console.log(`Server is running http://localhost:${port}`);
